Skip to content

Attributes cleanup in tests [12/20]#17096

Open
samueltardieu wants to merge 1 commit into
rust-lang:masterfrom
samueltardieu:attributes-cleanup-tests-12
Open

Attributes cleanup in tests [12/20]#17096
samueltardieu wants to merge 1 commit into
rust-lang:masterfrom
samueltardieu:attributes-cleanup-tests-12

Conversation

@samueltardieu

Copy link
Copy Markdown
Member

changelog: none

r? ada4a

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label May 28, 2026
@samueltardieu samueltardieu force-pushed the attributes-cleanup-tests-12 branch 2 times, most recently from 1a01808 to 5f08d77 Compare June 2, 2026 16:42
@samueltardieu samueltardieu force-pushed the attributes-cleanup-tests-12 branch 2 times, most recently from 8791e76 to 4d542ee Compare June 8, 2026 12:48
@ada4a ada4a mentioned this pull request Jun 8, 2026

@ada4a ada4a left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial review due to a potential conflict with #17190 -- you could either perform the changes in this PR, or I could do in mine

View changes since this review

Comment thread tests/ui/mem_replace.rs Outdated
clippy::mem_replace_option_with_none,
clippy::mem_replace_with_default
clippy::mem_replace_with_default,
clippy::style

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like clippy::style is a stand-in for clippy::mem_replace_option_with_some and clippy::mem_replace_with_uninit -- could you please change the file to use the latter instead?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just removed the clippy::style which doesn't play a role here.

Comment thread tests/ui/mem_replace_no_std.rs Outdated
Comment on lines +2 to +4
#![warn(
clippy::style,
clippy::mem_replace_option_with_none,
clippy::mem_replace_with_default
clippy::mem_replace_with_default,
clippy::style

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Jun 8, 2026
@samueltardieu samueltardieu force-pushed the attributes-cleanup-tests-12 branch from 4d542ee to 5c4e9a6 Compare June 8, 2026 16:16
@samueltardieu samueltardieu requested a review from ada4a June 8, 2026 16:17
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Jun 8, 2026
@samueltardieu samueltardieu force-pushed the attributes-cleanup-tests-12 branch from 5c4e9a6 to 029b8d2 Compare June 9, 2026 10:47
@rustbot

rustbot commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

pull Bot pushed a commit to brightly-salty/rust-clippy that referenced this pull request Jun 9, 2026
This ended up being bigger than I expected...

This PR mainly does the following:
- Commit 2 expands on
rust-lang#17096 by cleaning up the
attributes, and cleans up some more.
- `mem_replace.rs` used to test
`mem_replace_{option_with_none,option_with_some,default}`, which
resulted in a rather big and messy file. Commits 4-6 split it into
three.
- Meanwhile, `mem_replace_with_uninit` was tested in a completely
separate file, called `repl_uninit` (?!). Commit 3 renames it and cleans
it up.

As always, see the individual commits for more details.

changelog: [`mem_replace_option_with_some`]: clean-up the lint message
changelog: [`mem_replace_option_with_none`]: clean-up the lint message
changelog: [`mem_replace_with_uninit`]: clean-up the lint message
changelog: [`mem_replace_with_default`]: split off the suggestion from
the main message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants